﻿// ....................................................................................................................
//	Author: Copyright (C) 2012 Ing. Marek Hubal
//	Email: hubal@acasoftware.org
// ....................................................................................................................

using System;
using core;

namespace tester
{
    /// <summary>Trieda tester</summary>
    public class tester
    {
        public const string EXISTING_SMB_DIR = @"\\test-computer\test_share\hard_dir";
        public const string EXISTING_SMB_FILE = @"\\test-computer\test_share\hard_file";
        public const string NOT_EXISTING_SMB_DIR = @"\\test-computer\test_share\dummy_dir";
        public const string EXISTING_LOCAL_DIR = @"c:\\windows";
        public const string EXISTING_LOCAL_FILE = @"c:\\windows\\explorer.exe";
        public const string TEST_ROOT_DIRECTORY = @"c:\totalem_test";
        public const string READY_CDROM_EXISTING_DIR = @"f:\x64";
        public const string READY_CDROM_EXISTING_FILE = @"f:\autorun.inf";
        public const string READY_CDROM_NOT_EXISTING_DIR = @"f:\x64_dummy";
        public const string READY_CDROM_NOT_EXISTING_FILE = @"f:\autorun_dummy.inf";
        public const string NOT_READY_CDROM_PATH = @"g:\";

        /// <summary>Hlavna funkcia aplikacie</summary>
        /// <param name="args">argumenty spustenia</param>
        public static void Main(string[] args)
        {
            temp.Run();
            return;

            if (!RunValidityTest_1()) return; // Test prostredia
            if (!RunValidityTest_2()) return; // Test IParamList
            //if (!RunValidityTest_3()) return; // Test IFileSystem
            if (!RunValidityTest_4()) return; // Test IConfig
            if (!RunValidityTest_5()) return; // Test INodeFilters
            Console.WriteLine("All validity tests are OK.");
        }

        /// <summary>Zobrazenie chyby</summary>
        /// <param name="pFunction">cislo funkcie</param>
        /// <param name="pID">cislo chyby</param>
        /// <returns>false</returns>
        public static bool ShowError(int pFunction, int pID)
        {
            Console.WriteLine(string.Format("Test validity error {0}.{1}", pFunction, pID));
            Console.ReadKey();
            return false;
        }

        /// <summary>Spustenie testu spravnosti - prostredie</summary>
        /// <returns>true / false</returns>
        public static bool RunValidityTest_1()
        {
            Console.Write("Validity test - environment... ");
            if (ICore.Dbl2Str(1234.1234567890123, 0) != "1234") return ShowError(1, 1);
            if (ICore.Dbl2Str(1234.1234567890123, 1) != "1234.1") return ShowError(1, 2);
            if (ICore.Dbl2Str(1234.1234567890123, 2) != "1234.12") return ShowError(1, 3);
            if (ICore.Dbl2Str(1234.1234567890123, 3) != "1234.123") return ShowError(1, 4);
            if (ICore.Dbl2Str(1234.1234567890123, 4) != "1234.1235") return ShowError(1, 5);
            if (ICore.Dbl2Str(1234.1234567890123, 5) != "1234.12346") return ShowError(1, 6);
            if (ICore.Dbl2Str(1234.1234567890123, 6) != "1234.123457") return ShowError(1, 7);
            if (ICore.Dbl2Str(1234.1234567890123, 7) != "1234.1234568") return ShowError(1, 8);
            if (ICore.Dbl2Str(1234.1234567890123, 8) != "1234.12345679") return ShowError(1, 9);
            if (ICore.Dbl2Str(1234.1234567890123, 9) != "1234.123456789") return ShowError(1, 10);
            if (ICore.Dbl2Str(1234.1234567890123, 10) != "1234.1234567890") return ShowError(1, 11);
            if (ICore.Dbl2Str(1234.1234567890123, 11) != "1234.12345678901") return ShowError(1, 12);
            if (ICore.Dbl2Str(123.1234567890123, 12) != "123.123456789012") return ShowError(1, 13);

            if (ICore.Str2Dbl("") != 0) return ShowError(1, 14);
            if (ICore.Str2Dbl("123.1") != 123.1) return ShowError(1, 15);
            if (ICore.Str2Dbl("-123,12345678901") != -123.12345678901) return ShowError(1, 16);

            Console.WriteLine("OK.");
            return true; // Vsetko OK
        }
        /// <summary>Spustenie testu spravnosti - IParamList</summary>
        /// <returns>true / false</returns>
        public static bool RunValidityTest_2()
        {
            Console.Write("Validity test - IParamList... ");

            using (IParamList P1 = new IParamList())
            {
                using (IParamList P2 = new IParamList())
                {
                    P1.SetParam("p1", (int)-123);
                    P1.SetParam("p2", (uint)123);
                    P1.SetParam("p3", (long)-123456789012);
                    P1.SetParam("p4", (ulong)123456789012);
                    P1.SetParam("p5", (double)-123.223356);
                    P1.SetParam("p6", true);
                    P1.SetParam("p7", "String");

                    if (P1.Count != 7) return ShowError(2, 1);
                    if (P1.GetParam("P1", (int)0) != -123) return ShowError(2, 2);
                    if (P1.GetParam("P2", (uint)0) != 123) return ShowError(2, 3);
                    if (P1.GetParam("P3", (long)0) != -123456789012) return ShowError(2, 4);
                    if (P1.GetParam("P4", (ulong)0) != 123456789012) return ShowError(2, 5);
                    if (P1.GetParam("P5", (double)0) != -123.223356) return ShowError(2, 6);
                    if (P1.GetParam("P6", (bool)false) != true) return ShowError(2, 7);
                    if (P1.GetParam("P7", "") != "String") return ShowError(2, 8);

                    P2.Assign(P1);
                    if (P2.Count != 7) return ShowError(2, 9);
                    if (P2.GetParam("P1", (int)0) != -123) return ShowError(2, 10);
                    if (P2.GetParam("P2", (uint)0) != 123) return ShowError(2, 11);
                    if (P2.GetParam("P3", (long)0) != -123456789012) return ShowError(2, 12);
                    if (P2.GetParam("P4", (ulong)0) != 123456789012) return ShowError(2, 13);
                    if (P2.GetParam("P5", (double)0) != -123.223356) return ShowError(2, 14);
                    if (P2.GetParam("P6", (bool)false) != true) return ShowError(2, 15);
                    if (P2.GetParam("P7", "") != "String") return ShowError(2, 16);

                    P2.Clear();
                    P2.Deserialize(P1.Serialize(false), false);
                    if (P2.Count != 7) return ShowError(2, 17);
                    if (P2.GetParam("P1", (int)0) != -123) return ShowError(2, 18);
                    if (P2.GetParam("P2", (uint)0) != 123) return ShowError(2, 19);
                    if (P2.GetParam("P3", (long)0) != -123456789012) return ShowError(2, 20);
                    if (P2.GetParam("P4", (ulong)0) != 123456789012) return ShowError(2, 21);
                    if (P2.GetParam("P5", (double)0) != -123.223356) return ShowError(2, 22);
                    if (P2.GetParam("P6", (bool)false) != true) return ShowError(2, 23);
                    if (P2.GetParam("P7", "") != "String") return ShowError(2, 24);

                    P2.Clear();
                    P2.Deserialize(P1.Serialize(true), true);
                    if (P2.Count != 7) return ShowError(2, 25);
                    if (P2.GetParam("P1", (int)0) != -123) return ShowError(2, 26);
                    if (P2.GetParam("P2", (uint)0) != 123) return ShowError(2, 27);
                    if (P2.GetParam("P3", (long)0) != -123456789012) return ShowError(2, 28);
                    if (P2.GetParam("P4", (ulong)0) != 123456789012) return ShowError(2, 29);
                    if (P2.GetParam("P5", (double)0) != -123.223356) return ShowError(2, 30);
                    if (P2.GetParam("P6", (bool)false) != true) return ShowError(2, 31);
                    if (P2.GetParam("P7", "") != "String") return ShowError(2, 32);

                    P2.Delete("p3");
                    if (P2.Count != 6) return ShowError(2, 33);
                }
            }

            Console.WriteLine("OK.");
            return true; // Vsetko OK
        }
        /// <summary>Spustenie testu spravnosti - IFileSystem</summary>
        /// <returns>true / false</returns>
        public static bool RunValidityTest_3()
        {
            Console.Write("Validity test - IFileSystem... ");

            string S, S1;

            if (IFileSystem._GetPathType("", out S) != IFileSystem.PATH_TYPE_ROOT) return ShowError(3, 1);
            if (S != "") return ShowError(3, 2);
            if (IFileSystem._GetPathType("\\\\", out S) != IFileSystem.PATH_TYPE_SAMBA_ROOT) return ShowError(3, 3);
            if (S != "\\\\") return ShowError(3, 4);
            if (IFileSystem._GetPathType("\\\\test-computer", out S) != IFileSystem.PATH_TYPE_SAMBA_COMPUTER) return ShowError(3, 5);
            if (S != "\\\\test-computer") return ShowError(3, 6);
            if (IFileSystem._GetPathType("\\\\test-computer\\", out S) != IFileSystem.PATH_TYPE_SAMBA_COMPUTER) return ShowError(3, 7);
            if (S != "\\\\test-computer") return ShowError(3, 8);
            if (IFileSystem._GetPathType("\\\\test-computer\\share\\", out S) != IFileSystem.PATH_TYPE_SAMBA_COMPUTER_SHARE) return ShowError(3, 9);
            if (S != "\\\\test-computer\\share") return ShowError(3, 10);
            if (IFileSystem._GetPathType("\\\\test-computer\\share\\dir\\", out S) != IFileSystem.PATH_TYPE_SAMBA_FILE_SYSTEM) return ShowError(3, 11);
            if (S != "\\\\test-computer\\share\\dir") return ShowError(3, 12);
            if (IFileSystem._GetPathType("c:\\", out S) != IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM_ROOT) return ShowError(3, 13);
            if (S != "c:\\") return ShowError(3, 14);
            if (IFileSystem._GetPathType("D:\\dir\\", out S) != IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM) return ShowError(3, 15);
            if (S != "D:\\dir") return ShowError(3, 16);

            if (IFileSystem.AppendPathSeparator("") != "") return ShowError(3, 17);
            if (IFileSystem.AppendPathSeparator("\\\\") != "\\\\") return ShowError(3, 18);
            if (IFileSystem.AppendPathSeparator("\\\\test-computer") != "\\\\test-computer\\") return ShowError(3, 19);
            if (IFileSystem.AppendPathSeparator("\\\\test-computer\\share\\") != "\\\\test-computer\\share\\") return ShowError(3, 20);
            if (IFileSystem.AppendPathSeparator("\\\\test-computer\\share\\dir") != "\\\\test-computer\\share\\dir\\") return ShowError(3, 21);
            if (IFileSystem.AppendPathSeparator("c:\\") != "c:\\") return ShowError(3, 22);
            if (IFileSystem.AppendPathSeparator("c:\\windows") != "c:\\windows\\") return ShowError(3, 23);

            if (IFileSystem.DeletePathSeparator("") != "") return ShowError(3, 24);
            if (IFileSystem.DeletePathSeparator("\\\\") != "\\\\") return ShowError(3, 25);
            if (IFileSystem.DeletePathSeparator("\\\\test-computer") != "\\\\test-computer") return ShowError(3, 26);
            if (IFileSystem.DeletePathSeparator("\\\\test-computer\\share\\") != "\\\\test-computer\\share") return ShowError(3, 27);
            if (IFileSystem.DeletePathSeparator("\\\\test-computer\\share\\dir") != "\\\\test-computer\\share\\dir") return ShowError(3, 28);
            if (IFileSystem.DeletePathSeparator("c:\\") != "c:\\") return ShowError(3, 29);
            if (IFileSystem.DeletePathSeparator("c:\\windows") != "c:\\windows") return ShowError(3, 30);

            if (IFileSystem.AppendToPath("", "aaa") != "aaa") return ShowError(3, 31);
            if (IFileSystem.AppendToPath("\\\\", "test-computer") != "\\\\test-computer") return ShowError(3, 32);
            if (IFileSystem.AppendToPath("\\\\", "test-computer\\share\\") != "\\\\test-computer\\share") return ShowError(3, 33);
            if (IFileSystem.AppendToPath("c:\\", "\\windows\\system32") != "c:\\windows\\system32") return ShowError(3, 34);

            if (IFileSystem.ExtractPath("") != "") return ShowError(3, 35);
            if (IFileSystem.ExtractPath("\\\\") != "") return ShowError(3, 36);
            if (IFileSystem.ExtractPath("\\\\test-computer\\") != "\\\\") return ShowError(3, 37);
            if (IFileSystem.ExtractPath("\\\\test-computer\\share\\") != "\\\\test-computer") return ShowError(3, 38);
            if (IFileSystem.ExtractPath("\\\\test-computer\\share\\dir\\") != "\\\\test-computer\\share") return ShowError(3, 39);
            if (IFileSystem.ExtractPath("\\\\test-computer\\share\\dir\\dir2\\") != "\\\\test-computer\\share\\dir") return ShowError(3, 40);
            if (IFileSystem.ExtractPath("c:\\") != "") return ShowError(3, 41);
            if (IFileSystem.ExtractPath("c:\\windows\\") != "c:\\") return ShowError(3, 42);
            if (IFileSystem.ExtractPath("c:\\windows\\system32\\") != "c:\\windows") return ShowError(3, 43);

            if (IFileSystem.ExtractName("") != "") return ShowError(3, 44);
            if (IFileSystem.ExtractName("\\\\") != "\\\\") return ShowError(3, 45);
            if (IFileSystem.ExtractName("\\\\test-computer\\") != "test-computer") return ShowError(3, 46);
            if (IFileSystem.ExtractName("\\\\test-computer\\share\\") != "share") return ShowError(3, 47);
            if (IFileSystem.ExtractName("\\\\test-computer\\share\\dir\\") != "dir") return ShowError(3, 48);
            if (IFileSystem.ExtractName("\\\\test-computer\\share\\dir\\dir2\\") != "dir2") return ShowError(3, 49);
            if (IFileSystem.ExtractName("c:\\") != "c:\\") return ShowError(3, 50);
            if (IFileSystem.ExtractName("c:\\windows\\") != "windows") return ShowError(3, 51);
            if (IFileSystem.ExtractName("c:\\windows\\system32\\") != "system32") return ShowError(3, 52);
            if (IFileSystem.ExtractName("file.txt") != "file.txt") return ShowError(3, 53);

            if (IFileSystem.ExtractNameOnly("") != "") return ShowError(3, 54);
            if (IFileSystem.ExtractNameOnly("file.ext") != "file") return ShowError(3, 55);
            if (IFileSystem.ExtractNameOnly("file.ext.ext2") != "file.ext") return ShowError(3, 56);
            if (IFileSystem.ExtractNameOnly("c:\\file.ext.ext2") != "file.ext") return ShowError(3, 57);
            if (IFileSystem.ExtractNameOnly("\\\\") != "\\\\") return ShowError(3, 58);

            if (IFileSystem.ExtractExtension("") != "") return ShowError(3, 59);
            if (IFileSystem.ExtractExtension("file.ext") != "ext") return ShowError(3, 60);
            if (IFileSystem.ExtractExtension("file.ext.ext2") != "ext2") return ShowError(3, 61);
            if (IFileSystem.ExtractExtension("c:\\file.ext.ext2") != "ext2") return ShowError(3, 62);
            if (IFileSystem.ExtractExtension("\\\\") != "") return ShowError(3, 63);

            if (IFileSystem.GetObjectType("") != IFileSystem.OBJECT_TYPE_ROOT) return ShowError(3, 64);
            if (IFileSystem.GetObjectType("\\\\") != IFileSystem.OBJECT_TYPE_SAMBA_ROOT) return ShowError(3, 65);
            if (IFileSystem.GetObjectType("\\\\test-computer") != IFileSystem.OBJECT_TYPE_SAMBA_COMPUTER) return ShowError(3, 66);
            if (IFileSystem.GetObjectType("\\\\test-computer\\share\\") != IFileSystem.OBJECT_TYPE_SAMBA_COMPUTER_SHARE) return ShowError(3, 67);
            //if (IFileSystem.GetObjectType(EXISTING_SMB_DIR) != IFileSystem.OBJECT_TYPE_DIRECTORY) return ShowError(3, 68);
            if (IFileSystem.GetObjectType(NOT_EXISTING_SMB_DIR) != -1) return ShowError(3, 69);
            if (IFileSystem.GetObjectType("c:\\") != IFileSystem.OBJECT_TYPE_LOCAL_FS_ROOT) return ShowError(3, 70);
            if (IFileSystem.GetObjectType(EXISTING_LOCAL_DIR) != IFileSystem.OBJECT_TYPE_DIRECTORY) return ShowError(3, 71);
            if (IFileSystem.GetObjectType(EXISTING_LOCAL_FILE) != IFileSystem.OBJECT_TYPE_FILE) return ShowError(3, 72);
            if (IFileSystem.GetObjectType("c:\\Windows\\explorer_dummy.exe") != -1) return ShowError(3, 73);
            if (IFileSystem.GetObjectType("c:\\Windows_dummy") != -1) return ShowError(3, 74);

            if (IFileSystem.GetObjectType(TEST_ROOT_DIRECTORY) != IFileSystem.OBJECT_TYPE_DIRECTORY) return ShowError(3, 75);
            if (IFileSystem.CreateDirectory(TEST_ROOT_DIRECTORY) != IFileSystem.FS_ERROR_DIRECTORY_EXISTS) return ShowError(3, 76);
            if (IFileSystem.CreateDirectory("") != IFileSystem.FS_ERROR_OBJECT_EXISTS) return ShowError(3, 77);
            if (IFileSystem.CreateDirectory("\\\\") != IFileSystem.FS_ERROR_OBJECT_EXISTS) return ShowError(3, 78);
            if (IFileSystem.CreateDirectory("\\\\test-computer") != IFileSystem.FS_ERROR_OBJECT_EXISTS) return ShowError(3, 79);
            if (IFileSystem.CreateDirectory("\\\\test-computer\\test_share\\") != IFileSystem.FS_ERROR_OBJECT_EXISTS) return ShowError(3, 80);
            //if (IFileSystem.CreateDirectory(EXISTING_SMB_DIR) != IFileSystem.FS_ERROR_DIRECTORY_EXISTS) return ShowError(3, 81);
            //if (IFileSystem.CreateDirectory(EXISTING_SMB_FILE) != IFileSystem.FS_ERROR_FILE_EXISTS) return ShowError(3, 82);
            if (IFileSystem.CreateDirectory(EXISTING_LOCAL_FILE) != IFileSystem.FS_ERROR_FILE_EXISTS) return ShowError(3, 83);
            if (IFileSystem.CreateDirectory(READY_CDROM_EXISTING_DIR) != IFileSystem.FS_ERROR_DIRECTORY_EXISTS) return ShowError(3, 84);
            if (IFileSystem.CreateDirectory(READY_CDROM_EXISTING_FILE) != IFileSystem.FS_ERROR_FILE_EXISTS) return ShowError(3, 85);
            //if (IFileSystem.CreateDirectory(IFileSystem.AppendToPath(NOT_READY_CDROM_PATH, "dir")) != IFileSystem.FS_ERROR_DEVICE_NOT_READY) return ShowError(3, 86);
            if (IFileSystem.CreateDirectory(IFileSystem.AppendToPath(READY_CDROM_EXISTING_DIR, "dir")) != IFileSystem.FS_ERROR_ACCESS_DENIED) return ShowError(3, 87);
            if (IFileSystem.CreateDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1")) != 0) return ShowError(3, 88);
            if (IFileSystem.CreateDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir2\\dir1")) != IFileSystem.FS_ERROR_PATH_NOT_FOUND) return ShowError(3, 89);
            if (IFileSystem.CreateFullDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir2\\dir1")) != 0) return ShowError(3, 90);
            if (IFileSystem.CreateFullDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir2\\dir1")) != IFileSystem.FS_ERROR_DIRECTORY_EXISTS) return ShowError(3, 91);

            if (IFileSystem.RenameDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir2"), "dir1") != IFileSystem.FS_ERROR_DIRECTORY_EXISTS) return ShowError(3, 92);
            if (IFileSystem.RenameDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir3"), "dir1") != IFileSystem.FS_ERROR_PATH_NOT_FOUND) return ShowError(3, 93);
            if (IFileSystem.RenameDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir2\\dir1"), "dir2") != 0) return ShowError(3, 94);
            if (IFileSystem.RenameDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1"), "hard_file") != IFileSystem.FS_ERROR_FILE_EXISTS) return ShowError(3, 95);
            if (IFileSystem.RenameDirectory(READY_CDROM_EXISTING_DIR, "dir2") != IFileSystem.FS_ERROR_ACCESS_DENIED) return ShowError(3, 96);
            if (IFileSystem.RenameDirectory(IFileSystem.AppendToPath(NOT_READY_CDROM_PATH, "dir1"), "hard_file") != IFileSystem.FS_ERROR_PATH_NOT_FOUND) return ShowError(3, 97);

            if (IFileSystem.DeleteDirectory(READY_CDROM_EXISTING_DIR) != IFileSystem.FS_ERROR_ACCESS_DENIED) return ShowError(3, 98);
            if (IFileSystem.DeleteDirectory(READY_CDROM_EXISTING_FILE) != IFileSystem.FS_ERROR_PATH_NOT_FOUND) return ShowError(3, 99);
            if (IFileSystem.DeleteDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir2\\dir1")) != IFileSystem.FS_ERROR_PATH_NOT_FOUND) return ShowError(3, 100);
            if (IFileSystem.DeleteDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir2")) != IFileSystem.FS_ERROR_DIRECTORY_NOT_EMPTY) return ShowError(3, 101);
            if (IFileSystem.DeleteDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir2\\dir2")) != 0) return ShowError(3, 102);
            if (IFileSystem.DeleteDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir2")) != 0) return ShowError(3, 103);
            if (IFileSystem.DeleteDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1")) != 0) return ShowError(3, 104);
            if (IFileSystem.DeleteDirectory(IFileSystem.AppendToPath(NOT_READY_CDROM_PATH, "dir1")) != IFileSystem.FS_ERROR_PATH_NOT_FOUND) return ShowError(3, 105);

            if (IFileSystem.CreateDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1")) != 0) return ShowError(3, 106);
            S = "test string";
            if (IFileSystem.SaveStringToTextFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1"), S, false) != IFileSystem.FS_ERROR_OBJECT_EXISTS) return ShowError(3, 107);
            if (IFileSystem.SaveStringToTextFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1\\file.txt"), S, false) != 0) return ShowError(3, 108);
            if (IFileSystem.SaveStringToTextFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1\\file.txt"), S, false) != IFileSystem.FS_ERROR_FILE_EXISTS) return ShowError(3, 109);
            if (IFileSystem.SaveStringToTextFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1\\file.txt"), S, true) != 0) return ShowError(3, 110);
            if (IFileSystem.SaveStringToTextFile(IFileSystem.AppendToPath(READY_CDROM_EXISTING_DIR, "file.txt"), S, true) != IFileSystem.FS_ERROR_ACCESS_DENIED) return ShowError(3, 111);
            if (IFileSystem.LoadStringFromTextFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1\\file.txt"), out S1) != 0) return ShowError(3, 112);
            if (S1 != S) return ShowError(3, 113);
            if (IFileSystem.RenameFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1\\file.txt"), "file2.txt") != 0) return ShowError(3, 113);
            if (IFileSystem.RenameFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1"), "file2.txt") != IFileSystem.FS_ERROR_PATH_NOT_FOUND) return ShowError(3, 114);
            if (IFileSystem.DeleteFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1")) != IFileSystem.FS_ERROR_PATH_NOT_FOUND) return ShowError(3, 115);
            if (IFileSystem.DeleteFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1\\file2.txt")) != 0) return ShowError(3, 116);
            if (IFileSystem.DeleteFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1\\file2.txt")) != IFileSystem.FS_ERROR_PATH_NOT_FOUND) return ShowError(3, 117);
            if (IFileSystem.DeleteFile(READY_CDROM_EXISTING_FILE) != IFileSystem.FS_ERROR_ACCESS_DENIED) return ShowError(3, 118);
            if (IFileSystem.DeleteDirectory(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "dir1")) != 0) return ShowError(3, 119);

            if (IFileSystem.ExtractDeviceRoot("") != "") return ShowError(3, 120);
            if (IFileSystem.ExtractDeviceRoot("\\\\") != "") return ShowError(3, 121);
            if (IFileSystem.ExtractDeviceRoot("\\\\computer") != "") return ShowError(3, 122);
            if (IFileSystem.ExtractDeviceRoot("\\\\computer\\share") != "\\\\computer\\share") return ShowError(3, 123);
            if (IFileSystem.ExtractDeviceRoot("\\\\computer\\share\\dir") != "\\\\computer\\share") return ShowError(3, 124);
            if (IFileSystem.ExtractDeviceRoot("c:\\") != "c:\\") return ShowError(3, 125);
            if (IFileSystem.ExtractDeviceRoot("c:\\windows") != "c:\\") return ShowError(3, 126);

            if (IFileSystem.GetPathDepth("") != 0) return ShowError(3, 127);
            if (IFileSystem.GetPathDepth("c:\\") != 1) return ShowError(3, 128);
            if (IFileSystem.GetPathDepth("c:\\windows") != 2) return ShowError(3, 129);
            if (IFileSystem.GetPathDepth("c:\\windows\\system32\\") != 3) return ShowError(3, 130);
            if (IFileSystem.GetPathDepth("\\\\") != 1) return ShowError(3, 131);
            if (IFileSystem.GetPathDepth("\\\\computer") != 2) return ShowError(3, 132);
            if (IFileSystem.GetPathDepth("\\\\computer\\share") != 3) return ShowError(3, 133);
            if (IFileSystem.GetPathDepth("\\\\computer\\share\\test") != 4) return ShowError(3, 134);

            if (IFileSystem.ExtractSubpath("c:\\windows\\system32\\", 0) != "") return ShowError(3, 135);
            if (IFileSystem.ExtractSubpath("c:\\windows\\system32\\", 1) != "c:\\") return ShowError(3, 136);
            if (IFileSystem.ExtractSubpath("c:\\windows\\system32\\", 2) != "c:\\windows") return ShowError(3, 137);
            if (IFileSystem.ExtractSubpath("c:\\windows\\system32\\", 3) != "c:\\windows\\system32") return ShowError(3, 138);
            if (IFileSystem.ExtractSubpath("c:\\windows\\system32\\", 4) != "c:\\windows\\system32") return ShowError(3, 139);

            if (IFileSystem.ExtractSubpath("\\\\computer\\share\\dir\\", 0) != "") return ShowError(3, 140);
            if (IFileSystem.ExtractSubpath("\\\\computer\\share\\dir\\", 1) != "\\\\") return ShowError(3, 141);
            if (IFileSystem.ExtractSubpath("\\\\computer\\share\\dir\\", 2) != "\\\\computer") return ShowError(3, 142);
            if (IFileSystem.ExtractSubpath("\\\\computer\\share\\dir\\", 3) != "\\\\computer\\share") return ShowError(3, 143);
            if (IFileSystem.ExtractSubpath("\\\\computer\\share\\dir\\", 4) != "\\\\computer\\share\\dir") return ShowError(3, 144);
            if (IFileSystem.ExtractSubpath("\\\\computer\\share\\dir\\", 5) != "\\\\computer\\share\\dir") return ShowError(3, 145);

            Console.WriteLine("OK.");
            return true; // Vsetko OK
        }
        /// <summary>Spustenie testu spravnosti - IConfig</summary>
        /// <returns>true / false</returns>
        public static bool RunValidityTest_4()
        {
            Console.Write("Validity test - IConfig... ");

            using (IConfig C1 = new IConfig())
            {
                using (IConfig C2 = new IConfig())
                {
                    C1.SetParam("p1", (int)-123);
                    C1.SetParam("p2", (uint)123);
                    C1.SetParam("p3", (long)-123456789012);
                    C1.SetParam("p4", (ulong)123456789012);
                    C1.SetParam("p5", (double)-123.223356);
                    C1.SetParam("p6", true);
                    C1.SetParam("p7", "String");

                    if (C1.GetParam("P1", (int)0) != -123) return ShowError(4, 1);
                    if (C1.GetParam("P2", (uint)0) != 123) return ShowError(4, 2);
                    if (C1.GetParam("P3", (long)0) != -123456789012) return ShowError(4, 3);
                    if (C1.GetParam("P4", (ulong)0) != 123456789012) return ShowError(4, 4);
                    if (C1.GetParam("P5", (double)0) != -123.223356) return ShowError(4, 5);
                    if (C1.GetParam("P6", (bool)false) != true) return ShowError(4, 6);
                    if (C1.GetParam("P7", "") != "String") return ShowError(4, 7);

                    if (!C1.SaveConfiguration(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "test.cfg"))) return ShowError(4, 8);
                    if (!C2.LoadConfiguration(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "test.cfg"))) return ShowError(4, 9);
                    if (IFileSystem.DeleteFile(IFileSystem.AppendToPath(TEST_ROOT_DIRECTORY, "test.cfg")) != 0) return ShowError(4, 10);

                    if (C2.GetParam("P1", (int)0) != -123) return ShowError(4, 11);
                    if (C2.GetParam("P2", (uint)0) != 123) return ShowError(4, 12);
                    if (C2.GetParam("P3", (long)0) != -123456789012) return ShowError(4, 13);
                    if (C2.GetParam("P4", (ulong)0) != 123456789012) return ShowError(4, 14);
                    if (C2.GetParam("P5", (double)0) != -123.223356) return ShowError(4, 15);
                    if (C2.GetParam("P6", (bool)false) != true) return ShowError(4, 16);
                    if (C2.GetParam("P7", "") != "String") return ShowError(4, 17);
                }
            }

            Console.WriteLine("OK.");
            return true; // Vsetko OK
        }
        /// <summary>Spustenie testu spravnosti - INodeFilters</summary>
        /// <returns>true / false</returns>
        public static bool RunValidityTest_5()
        {
            /*
            Console.Write("Validity test - INodeFilters... ");

            using (INode N = new INode())
            {
                N.ID = INode.NODE_ID_LOCAL_ITEM; N.FindData = new IWin32.WIN32_FIND_DATA();
                N.FindData.dwFileAttributes = 0;
                using (INodeFilters F = new INodeFilters())
                {
                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_TEXT);
                    N.FindData.cFileName = "a.doc"; if (!F.TestNode(N)) return ShowError(5, 1);
                    N.FindData.cFileName = "a.docx"; if (!F.TestNode(N)) return ShowError(5, 2);
                    N.FindData.cFileName = "a.log"; if (!F.TestNode(N)) return ShowError(5, 3);
                    N.FindData.cFileName = "a.msg"; if (!F.TestNode(N)) return ShowError(5, 4);
                    N.FindData.cFileName = "a.odt"; if (!F.TestNode(N)) return ShowError(5, 5);
                    N.FindData.cFileName = "a.pages"; if (!F.TestNode(N)) return ShowError(5, 6);
                    N.FindData.cFileName = "a.rtf"; if (!F.TestNode(N)) return ShowError(5, 7);
                    N.FindData.cFileName = "a.tex"; if (!F.TestNode(N)) return ShowError(5, 8);
                    N.FindData.cFileName = "a.txt"; if (!F.TestNode(N)) return ShowError(5, 9);
                    N.FindData.cFileName = "a.wpd"; if (!F.TestNode(N)) return ShowError(5, 10);
                    N.FindData.cFileName = "a.wps"; if (!F.TestNode(N)) return ShowError(5, 11);
                    N.FindData.cFileName = "a.blabla"; if (F.TestNode(N)) return ShowError(5, 12);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_DATA);
                    N.FindData.cFileName = "a.csv"; if (!F.TestNode(N)) return ShowError(5, 13);
                    N.FindData.cFileName = "a.dat"; if (!F.TestNode(N)) return ShowError(5, 14);
                    N.FindData.cFileName = "a.db"; if (!F.TestNode(N)) return ShowError(5, 15);
                    N.FindData.cFileName = "a.dbf"; if (!F.TestNode(N)) return ShowError(5, 16);
                    N.FindData.cFileName = "a.efx"; if (!F.TestNode(N)) return ShowError(5, 17);
                    N.FindData.cFileName = "a.epub"; if (!F.TestNode(N)) return ShowError(5, 18);
                    N.FindData.cFileName = "a.gbr"; if (!F.TestNode(N)) return ShowError(5, 19);
                    N.FindData.cFileName = "a.ged"; if (!F.TestNode(N)) return ShowError(5, 20);
                    N.FindData.cFileName = "a.ibooks"; if (!F.TestNode(N)) return ShowError(5, 21);
                    N.FindData.cFileName = "a.key"; if (!F.TestNode(N)) return ShowError(5, 22);
                    N.FindData.cFileName = "a.pps"; if (!F.TestNode(N)) return ShowError(5, 23);
                    N.FindData.cFileName = "a.ppt"; if (!F.TestNode(N)) return ShowError(5, 24);
                    N.FindData.cFileName = "a.pptx"; if (!F.TestNode(N)) return ShowError(5, 25);
                    N.FindData.cFileName = "a.cdf"; if (!F.TestNode(N)) return ShowError(5, 26);
                    N.FindData.cFileName = "a.tar"; if (!F.TestNode(N)) return ShowError(5, 27);
                    N.FindData.cFileName = "a.vcf"; if (!F.TestNode(N)) return ShowError(5, 28);
                    N.FindData.cFileName = "a.xml"; if (!F.TestNode(N)) return ShowError(5, 29);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_AUDIO);
                    N.FindData.cFileName = "a.aif"; if (!F.TestNode(N)) return ShowError(5, 30);
                    N.FindData.cFileName = "a.iff"; if (!F.TestNode(N)) return ShowError(5, 31);
                    N.FindData.cFileName = "a.m3u"; if (!F.TestNode(N)) return ShowError(5, 32);
                    N.FindData.cFileName = "a.m4a"; if (!F.TestNode(N)) return ShowError(5, 33);
                    N.FindData.cFileName = "a.mid"; if (!F.TestNode(N)) return ShowError(5, 34);
                    N.FindData.cFileName = "a.mp3"; if (!F.TestNode(N)) return ShowError(5, 35);
                    N.FindData.cFileName = "a.mpa"; if (!F.TestNode(N)) return ShowError(5, 36);
                    N.FindData.cFileName = "a.ra"; if (!F.TestNode(N)) return ShowError(5, 37);
                    N.FindData.cFileName = "a.wav"; if (!F.TestNode(N)) return ShowError(5, 38);
                    N.FindData.cFileName = "a.wma"; if (!F.TestNode(N)) return ShowError(5, 39);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_VIDEO);
                    N.FindData.cFileName = "a.3g2"; if (!F.TestNode(N)) return ShowError(5, 40);
                    N.FindData.cFileName = "a.3gp"; if (!F.TestNode(N)) return ShowError(5, 41);
                    N.FindData.cFileName = "a.asf"; if (!F.TestNode(N)) return ShowError(5, 42);
                    N.FindData.cFileName = "a.asx"; if (!F.TestNode(N)) return ShowError(5, 43);
                    N.FindData.cFileName = "a.avi"; if (!F.TestNode(N)) return ShowError(5, 44);
                    N.FindData.cFileName = "a.flv"; if (!F.TestNode(N)) return ShowError(5, 45);
                    N.FindData.cFileName = "a.mov"; if (!F.TestNode(N)) return ShowError(5, 46);
                    N.FindData.cFileName = "a.mp4"; if (!F.TestNode(N)) return ShowError(5, 47);
                    N.FindData.cFileName = "a.mpg"; if (!F.TestNode(N)) return ShowError(5, 48);
                    N.FindData.cFileName = "a.rm"; if (!F.TestNode(N)) return ShowError(5, 49);
                    N.FindData.cFileName = "a.srt"; if (!F.TestNode(N)) return ShowError(5, 50);
                    N.FindData.cFileName = "a.swf"; if (!F.TestNode(N)) return ShowError(5, 51);
                    N.FindData.cFileName = "a.vob"; if (!F.TestNode(N)) return ShowError(5, 52);
                    N.FindData.cFileName = "a.wmv"; if (!F.TestNode(N)) return ShowError(5, 53);
                    N.FindData.cFileName = "a.sub"; if (!F.TestNode(N)) return ShowError(5, 54);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_3D_IMAGE);
                    N.FindData.cFileName = "a.3dm"; if (!F.TestNode(N)) return ShowError(5, 55);
                    N.FindData.cFileName = "a.max"; if (!F.TestNode(N)) return ShowError(5, 56);
                    N.FindData.cFileName = "a.obj"; if (!F.TestNode(N)) return ShowError(5, 57);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_RASTER_IMAGE);
                    N.FindData.cFileName = "a.bmp"; if (!F.TestNode(N)) return ShowError(5, 58);
                    N.FindData.cFileName = "a.dds"; if (!F.TestNode(N)) return ShowError(5, 59);
                    N.FindData.cFileName = "a.gif"; if (!F.TestNode(N)) return ShowError(5, 60);
                    N.FindData.cFileName = "a.jpg"; if (!F.TestNode(N)) return ShowError(5, 61);
                    N.FindData.cFileName = "a.jpeg"; if (!F.TestNode(N)) return ShowError(5, 62);
                    N.FindData.cFileName = "a.png"; if (!F.TestNode(N)) return ShowError(5, 63);
                    N.FindData.cFileName = "a.psd"; if (!F.TestNode(N)) return ShowError(5, 64);
                    N.FindData.cFileName = "a.pspimage"; if (!F.TestNode(N)) return ShowError(5, 65);
                    N.FindData.cFileName = "a.tga"; if (!F.TestNode(N)) return ShowError(5, 66);
                    N.FindData.cFileName = "a.thm"; if (!F.TestNode(N)) return ShowError(5, 67);
                    N.FindData.cFileName = "a.tif"; if (!F.TestNode(N)) return ShowError(5, 68);
                    N.FindData.cFileName = "a.yuv"; if (!F.TestNode(N)) return ShowError(5, 69);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_VECTOR_IMAGE);
                    N.FindData.cFileName = "a.ai"; if (!F.TestNode(N)) return ShowError(5, 70);
                    N.FindData.cFileName = "a.eps"; if (!F.TestNode(N)) return ShowError(5, 71);
                    N.FindData.cFileName = "a.ps"; if (!F.TestNode(N)) return ShowError(5, 72);
                    N.FindData.cFileName = "a.svg"; if (!F.TestNode(N)) return ShowError(5, 73);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_PAGE_LAYOUT);
                    N.FindData.cFileName = "a.indd"; if (!F.TestNode(N)) return ShowError(5, 74);
                    N.FindData.cFileName = "a.pct"; if (!F.TestNode(N)) return ShowError(5, 75);
                    N.FindData.cFileName = "a.pdf"; if (!F.TestNode(N)) return ShowError(5, 76);
                    N.FindData.cFileName = "a.xps"; if (!F.TestNode(N)) return ShowError(5, 77);
                    N.FindData.cFileName = "a.ps"; if (!F.TestNode(N)) return ShowError(5, 78);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_SPREAD_SHEET);
                    N.FindData.cFileName = "a.xlr"; if (!F.TestNode(N)) return ShowError(5, 79);
                    N.FindData.cFileName = "a.xls"; if (!F.TestNode(N)) return ShowError(5, 80);
                    N.FindData.cFileName = "a.xlsx"; if (!F.TestNode(N)) return ShowError(5, 81);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_DATABASE);
                    N.FindData.cFileName = "a.accdb"; if (!F.TestNode(N)) return ShowError(5, 82);
                    N.FindData.cFileName = "a.db"; if (!F.TestNode(N)) return ShowError(5, 83);
                    N.FindData.cFileName = "a.dbf"; if (!F.TestNode(N)) return ShowError(5, 84);
                    N.FindData.cFileName = "a.mdb"; if (!F.TestNode(N)) return ShowError(5, 85);
                    N.FindData.cFileName = "a.pdb"; if (!F.TestNode(N)) return ShowError(5, 86);
                    N.FindData.cFileName = "a.sql"; if (!F.TestNode(N)) return ShowError(5, 87);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_EXE);
                    N.FindData.cFileName = "a.app"; if (!F.TestNode(N)) return ShowError(5, 88);
                    N.FindData.cFileName = "a.bat"; if (!F.TestNode(N)) return ShowError(5, 89);
                    N.FindData.cFileName = "a.cgi"; if (!F.TestNode(N)) return ShowError(5, 90);
                    N.FindData.cFileName = "a.com"; if (!F.TestNode(N)) return ShowError(5, 91);
                    N.FindData.cFileName = "a.exe"; if (!F.TestNode(N)) return ShowError(5, 92);
                    N.FindData.cFileName = "a.gadget"; if (!F.TestNode(N)) return ShowError(5, 93);
                    N.FindData.cFileName = "a.jar"; if (!F.TestNode(N)) return ShowError(5, 94);
                    N.FindData.cFileName = "a.pif"; if (!F.TestNode(N)) return ShowError(5, 95);
                    N.FindData.cFileName = "a.vb"; if (!F.TestNode(N)) return ShowError(5, 96);
                    N.FindData.cFileName = "a.wsf"; if (!F.TestNode(N)) return ShowError(5, 97);
                    N.FindData.cFileName = "a.dll"; if (!F.TestNode(N)) return ShowError(5, 98);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_GAME);
                    N.FindData.cFileName = "a.dem"; if (!F.TestNode(N)) return ShowError(5, 99);
                    N.FindData.cFileName = "a.gam"; if (!F.TestNode(N)) return ShowError(5, 100);
                    N.FindData.cFileName = "a.nes"; if (!F.TestNode(N)) return ShowError(5, 101);
                    N.FindData.cFileName = "a.rom"; if (!F.TestNode(N)) return ShowError(5, 102);
                    N.FindData.cFileName = "a.sav"; if (!F.TestNode(N)) return ShowError(5, 103);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_CAD);
                    N.FindData.cFileName = "a.dwg"; if (!F.TestNode(N)) return ShowError(5, 104);
                    N.FindData.cFileName = "a.dxf"; if (!F.TestNode(N)) return ShowError(5, 105);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_GIS);
                    N.FindData.cFileName = "a.gpx"; if (!F.TestNode(N)) return ShowError(5, 106);
                    N.FindData.cFileName = "a.kml"; if (!F.TestNode(N)) return ShowError(5, 107);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_WEB);
                    N.FindData.cFileName = "a.asp"; if (!F.TestNode(N)) return ShowError(5, 108);
                    N.FindData.cFileName = "a.aspx"; if (!F.TestNode(N)) return ShowError(5, 109);
                    N.FindData.cFileName = "a.cer"; if (!F.TestNode(N)) return ShowError(5, 110);
                    N.FindData.cFileName = "a.cfm"; if (!F.TestNode(N)) return ShowError(5, 111);
                    N.FindData.cFileName = "a.csr"; if (!F.TestNode(N)) return ShowError(5, 112);
                    N.FindData.cFileName = "a.css"; if (!F.TestNode(N)) return ShowError(5, 113);
                    N.FindData.cFileName = "a.htm"; if (!F.TestNode(N)) return ShowError(5, 114);
                    N.FindData.cFileName = "a.html"; if (!F.TestNode(N)) return ShowError(5, 115);
                    N.FindData.cFileName = "a.js"; if (!F.TestNode(N)) return ShowError(5, 116);
                    N.FindData.cFileName = "a.jsp"; if (!F.TestNode(N)) return ShowError(5, 117);
                    N.FindData.cFileName = "a.php"; if (!F.TestNode(N)) return ShowError(5, 118);
                    N.FindData.cFileName = "a.rss"; if (!F.TestNode(N)) return ShowError(5, 119);
                    N.FindData.cFileName = "a.xhtml"; if (!F.TestNode(N)) return ShowError(5, 120);
                    N.FindData.cFileName = "a.xml"; if (!F.TestNode(N)) return ShowError(5, 121);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_PLUGIN);
                    N.FindData.cFileName = "a.8bi"; if (!F.TestNode(N)) return ShowError(5, 122);
                    N.FindData.cFileName = "a.plugin"; if (!F.TestNode(N)) return ShowError(5, 123);
                    N.FindData.cFileName = "a.xll"; if (!F.TestNode(N)) return ShowError(5, 124);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_FONT);
                    N.FindData.cFileName = "a.fnt"; if (!F.TestNode(N)) return ShowError(5, 125);
                    N.FindData.cFileName = "a.fon"; if (!F.TestNode(N)) return ShowError(5, 126);
                    N.FindData.cFileName = "a.otf"; if (!F.TestNode(N)) return ShowError(5, 127);
                    N.FindData.cFileName = "a.ttf"; if (!F.TestNode(N)) return ShowError(5, 128);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_SYSTEM);
                    N.FindData.cFileName = "a.cab"; if (!F.TestNode(N)) return ShowError(5, 129);
                    N.FindData.cFileName = "a.cpl"; if (!F.TestNode(N)) return ShowError(5, 130);
                    N.FindData.cFileName = "a.cur"; if (!F.TestNode(N)) return ShowError(5, 131);
                    N.FindData.cFileName = "a.dll"; if (!F.TestNode(N)) return ShowError(5, 132);
                    N.FindData.cFileName = "a.dmp"; if (!F.TestNode(N)) return ShowError(5, 133);
                    N.FindData.cFileName = "a.drv"; if (!F.TestNode(N)) return ShowError(5, 134);
                    N.FindData.cFileName = "a.lnk"; if (!F.TestNode(N)) return ShowError(5, 135);
                    N.FindData.cFileName = "a.icns"; if (!F.TestNode(N)) return ShowError(5, 136);
                    N.FindData.cFileName = "a.ico"; if (!F.TestNode(N)) return ShowError(5, 137);
                    N.FindData.cFileName = "a.sys"; if (!F.TestNode(N)) return ShowError(5, 138);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_SETTINGS);
                    N.FindData.cFileName = "a.cfg"; if (!F.TestNode(N)) return ShowError(5, 139);
                    N.FindData.cFileName = "a.ini"; if (!F.TestNode(N)) return ShowError(5, 140);
                    N.FindData.cFileName = "a.keychain"; if (!F.TestNode(N)) return ShowError(5, 141);
                    N.FindData.cFileName = "a.prf"; if (!F.TestNode(N)) return ShowError(5, 142);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_ENCODED);
                    N.FindData.cFileName = "a.hqx"; if (!F.TestNode(N)) return ShowError(5, 143);
                    N.FindData.cFileName = "a.mim"; if (!F.TestNode(N)) return ShowError(5, 144);
                    N.FindData.cFileName = "a.uue"; if (!F.TestNode(N)) return ShowError(5, 145);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_COMPRESSED);
                    N.FindData.cFileName = "a.cab"; if (!F.TestNode(N)) return ShowError(5, 146);
                    N.FindData.cFileName = "a.7z"; if (!F.TestNode(N)) return ShowError(5, 147);
                    N.FindData.cFileName = "a.deb"; if (!F.TestNode(N)) return ShowError(5, 148);
                    N.FindData.cFileName = "a.gz"; if (!F.TestNode(N)) return ShowError(5, 149);
                    N.FindData.cFileName = "a.pkg"; if (!F.TestNode(N)) return ShowError(5, 150);
                    N.FindData.cFileName = "a.rar"; if (!F.TestNode(N)) return ShowError(5, 151);
                    N.FindData.cFileName = "a.rmp"; if (!F.TestNode(N)) return ShowError(5, 152);
                    N.FindData.cFileName = "a.sit"; if (!F.TestNode(N)) return ShowError(5, 153);
                    N.FindData.cFileName = "a.sitx"; if (!F.TestNode(N)) return ShowError(5, 154);
                    N.FindData.cFileName = "a.zip"; if (!F.TestNode(N)) return ShowError(5, 155);
                    N.FindData.cFileName = "a.zipx"; if (!F.TestNode(N)) return ShowError(5, 156);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_DISK_IMAGE);
                    N.FindData.cFileName = "a.bin"; if (!F.TestNode(N)) return ShowError(5, 157);
                    N.FindData.cFileName = "a.cue"; if (!F.TestNode(N)) return ShowError(5, 158);
                    N.FindData.cFileName = "a.dmg"; if (!F.TestNode(N)) return ShowError(5, 159);
                    N.FindData.cFileName = "a.iso"; if (!F.TestNode(N)) return ShowError(5, 160);
                    N.FindData.cFileName = "a.toast"; if (!F.TestNode(N)) return ShowError(5, 161);
                    N.FindData.cFileName = "a.vcd"; if (!F.TestNode(N)) return ShowError(5, 162);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_DEVEL);
                    N.FindData.cFileName = "a.c"; if (!F.TestNode(N)) return ShowError(5, 163);
                    N.FindData.cFileName = "a.class"; if (!F.TestNode(N)) return ShowError(5, 164);
                    N.FindData.cFileName = "a.cpp"; if (!F.TestNode(N)) return ShowError(5, 165);
                    N.FindData.cFileName = "a.cs"; if (!F.TestNode(N)) return ShowError(5, 166);
                    N.FindData.cFileName = "a.dtd"; if (!F.TestNode(N)) return ShowError(5, 167);
                    N.FindData.cFileName = "a.fla"; if (!F.TestNode(N)) return ShowError(5, 168);
                    N.FindData.cFileName = "a.java"; if (!F.TestNode(N)) return ShowError(5, 169);
                    N.FindData.cFileName = "a.m"; if (!F.TestNode(N)) return ShowError(5, 170);
                    N.FindData.cFileName = "a.pl"; if (!F.TestNode(N)) return ShowError(5, 171);
                    N.FindData.cFileName = "a.py"; if (!F.TestNode(N)) return ShowError(5, 172);
                    N.FindData.cFileName = "a.pas"; if (!F.TestNode(N)) return ShowError(5, 173);

                    F.LoadPreddefined(INodeFilters.PREDDEFINED_ID_BACKUP);
                    N.FindData.cFileName = "a.bak"; if (!F.TestNode(N)) return ShowError(5, 174);
                    N.FindData.cFileName = "a.tmp"; if (!F.TestNode(N)) return ShowError(5, 175);
                }
            }

            Console.WriteLine("OK.");
             */
            return true; // Vsetko OK
        }
    }
}
